package com.clouds.wms.service;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.clouds.wms.bean.Cmsmh;
import com.clouds.wms.dao.CmsmhDao;
import com.clouds.wms.exception.SysException;
import com.clouds.wms.util.PagesBean;

@Service("cmsmhService")
public class CmsmhServiceImpl implements CmsmhService {
	
	@Resource(name="cmsmhDao")
	private CmsmhDao cmsmhDao;
	
	
	@Override
	public PagesBean getCmsmhList(String mhaa, String mhab, int mhad,int offset, int pageSize) throws SysException {
		return cmsmhDao.getCmsmhList(mhaa, mhab,mhad, offset, pageSize);
	}

	@Override
	public Cmsmh getCmsmhByMhaa(String mhaa) throws SysException {
		return cmsmhDao.getCmsmhByMhaa(mhaa);
	}

	@Override
	public int saveCmsmh(Cmsmh cmsmh) throws SysException {
		return cmsmhDao.saveCmsmh(cmsmh);
	}

	@Override
	public int updateCmsmhMham(String mhaa, int mham) throws SysException {
		return cmsmhDao.updateCmsmhMham(mhaa, mham);
	}

	@Override
	public int updateCmsmh(Cmsmh cmsmh) throws SysException {
		return cmsmhDao.updateCmsmh(cmsmh);
	}

	@Override
	public List<Cmsmh> getAllCmsmhList(int mham) throws SysException {
		return cmsmhDao.getAllCmsmhList(mham);
	}

	@Override
	public List<Cmsmh> getAllCmsmhList(String miac, int mham, String ecaa, String ecad, String ecae) throws SysException {
		return cmsmhDao.getAllCmsmhList(miac, mham, ecaa, ecad, ecae);
	}

	@Override
	public List<Cmsmh> getCmsmhListByMhac(String mhac, int mham) throws SysException {
		return cmsmhDao.getCmsmhListByMhac(mhac, mham);
	}
}
